const Controller = require('egg').Controller;

class AccessPlatformController extends Controller {


  // 获取所有的account
  async getAccountDetail () {

    const account = await this.ctx.service.accessPlatform.getAccountDetail()
    this.ctx.body = {
      code: 200,
      data: account
    };

  }

  // 获取用户列表
  async getUserdetail () {
    const users = await this.ctx.service.accessPlatform.getUserdetail()
    this.ctx.body = {
      code: 200,
      data: users,
    }
  }

  // 获取角色权限
  async getRoledetail () {
    const roles = await this.ctx.service.accessPlatform.getRoledetail()
    this.ctx.body = {
      code: 200,
      data: roles,
    }
  }


}

module.exports = AccessPlatformController;
